package com.aijk.ehm.sys.api;

import com.aijk.ehm.sys.model.qo.SysAdminQo;
import com.aijk.commons.exception.ErrorCodeException;
import com.aijk.ehm.sys.model.SysAdmin;
import com.github.pagehelper.PageInfo;

import java.util.List;

/**
 * 系统管理员接口
 */
public interface SysAdminApi {

    PageInfo<SysAdmin> getPage(SysAdminQo adminQo) throws ErrorCodeException;

    SysAdmin get(Integer adminId) throws ErrorCodeException;

    List<SysAdmin> get(SysAdminQo adminQo) throws ErrorCodeException;

    SysAdmin save(SysAdmin record) throws ErrorCodeException;

    SysAdmin save(SysAdmin record,String roles) throws ErrorCodeException;

    SysAdmin login(SysAdmin record) throws ErrorCodeException;

    int update(SysAdmin record) throws ErrorCodeException;

    int update(SysAdmin record,String roles) throws ErrorCodeException;


    int delete(Integer adminId) throws ErrorCodeException;

    SysAdmin findByUsername(String username) throws ErrorCodeException;

    void resetPass(SysAdminQo adminQo) throws ErrorCodeException;

}
